package com.itheima.dao;

import com.itheima.entity.Result;
import com.itheima.pojo.Role;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Set;

/**
 * @author xiaycbstart
 * @create 2019 12 30 18:24
 */
public interface RoleDao {
    @Select("select r.* from t_role r ,t_user_role ur where r.id = ur.role_id and ur.user_id= #{userId}")
    Set<Role> findByUserId(Integer userId);
    @Select("select * from t_role")
    List<Role> findAll();
}
